/**
 * @Description:
 * @author Aerowang
 * @date 2021/5/28
 */
const Router = require('koa-router')
const router = new Router()
const auth = require('../../controllers/auth')
const routers = router
  // 登录
  .post('/login', auth.login)
  // 注册
  .post('/register', auth.addUser)
  // .get('/info', auth.getAccountInfo)
  // .get('/info/:id', auth.getAccountInfoById)
  .post('/logout', auth.logout)
  .get('/user', auth.getUserList)
  .get('/user/:userId', auth.getUserInfoById)
  // .get('/account/date', auth.getAccountListByDate)
  .put('/user', auth.updateUser)
  .delete('/user', auth.deleteUser)
  .post('/user', auth.addUser)
  .post('/resetPassword', auth.resetPassword)
  .post('/updatePassword', auth.updatePassword)
  .get("/avatar/:userId", auth.getUserAvatar)
  // .post('/register', auth.addAccount)
module.exports = routers
